from django.contrib import admin
from django.urls import path, include
from rest_framework.routers import SimpleRouter
from . import views

router = SimpleRouter()
#api/v1/order/pay----->post请求---》生成订单，返回支付连接
router.register('pay', views.PayViewSet, 'pay')
router.register('paycourse', views.PayCourseViewSet, 'paycourse')
# router.register('vipcardorder', views.VipcardOrderViewSet, 'vipcardorder')
# router.register('courseorder', views.CourseOrderViewSet, 'courseorder')
urlpatterns = [
    path('success/', views.AliPayView.as_view()),
    path('vipnum/', views.VipNumView.as_view({'post':'list'})),
    path('successcourse/', views.AliPayCourseView.as_view()),
    path('courseorder/', views.CourseOrderViewSet.as_view({'post':'post'})),
    path('vipcardorder/', views.VipcardOrderViewSet.as_view({'post':'post'})),

]

urlpatterns += router.urls
